<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>欢迎页-LightDisk</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="../lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <link rel="stylesheet" href="../css/public.css" media="all">
</head>
<style>
    .layui-top-box {
        padding: 20px 10px 0px 10px;
        color: #fff
    }

    .panel {
        margin-bottom: 17px;
        background-color: #fff;
        border: 1px solid transparent;
        border-radius: 3px;
        -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
        box-shadow: 0 1px 1px rgba(0, 0, 0, .05)
    }

    .panel-body {
        padding: 15px
    }

    .panel-title {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 14px;
        color: inherit
    }

    .label {
        display: inline;
        padding: .2em .6em .3em;
        font-size: 75%;
        font-weight: 700;
        line-height: 1;
        color: #fff;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: .25em;
        margin-top: .3em;
    }

    .layui-red {
        color: red
    }

    .main_btn > p {
        height: 40px;
    }

    .account-title {
        font-size: 15px;
        font-weight: bold;
        margin-right: 1%;
    }

    .account-div {
        margin-bottom: 2%;
    }

    .account-uri {
        text-decoration: none;
        cursor: pointer;
        color: #005980;
        line-height: 1.5;
        text-align: left;
        font-size: 1rem;
    }
</style>
<body>
<div class="layuimini-container">
    <div class="layuimini-main layui-top-box">
        <div class="layui-row layui-col-space10">

            <div class="layui-col-md3">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-cyan">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-blue">实时</span>
                                <h5>区块高度</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">116</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 116
                                </div>
                                <small>当前本地区块高度</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md3">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-blue">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-cyan">实时</span>
                                <h5>心跳消息</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">252</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 252
                                </div>
                                <small>已接收的心跳消息数量</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-col-md3">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-green">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-orange">实时</span>
                                <h5>节点数</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">4</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 4
                                </div>
                                <small>Gossip网络上当前的节点数</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-col-md3">
                <div class="col-xs-6 col-md-3">
                    <div class="panel layui-bg-orange">
                        <div class="panel-body">
                            <div class="panel-title">
                                <span class="label pull-right layui-bg-green">实时</span>
                                <h5>存储文件</h5>
                            </div>
                            <div class="panel-content">
                                <h1 class="no-margins">14</h1>
                                <div class="stat-percent font-bold text-gray"><i class="fa fa-commenting"></i> 14
                                </div>
                                <small>已上传的文件数量</small>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-box">
        <div class="layui-row layui-col-space10">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">您的账户</div>
                    <div class="layui-card-body"
                         style=" word-break: break-all;width: 65%;">
                        <div class="account-div">
                            <span class="account-title">公钥 </span>
                            <span id="public-key"></span>
                        </div>
                        <div class="account-div">
                            <div>
                                <button class="layui-btn layui-btn-primary layui-btn-sm layui-btn-radius"
                                        onclick="displayPrivateKey()">
                                    <i id="privateKey-hidden-i" class="fa fa-toggle-on"></i>
                                    <span id="privateKey-hidden-text">显示</span>

                                </button>
                            </div>

                            <span class="account-title">私钥 </span>
                            <span id="private-key"
                                  style="display: none"></span>
                            <span id="private-key-hidden"
                            >**********</span>
                        </div>
                        <div class="account-div">
                            <span class="account-title">URI </span>
                            <span id="uri" class="account-uri"></span>
                            <span class="account-title" style=" margin-left: 3%;">ID </span>
                            <span id="id" class="account-uri"></span>
                        </div>
                        <div class="account-div">
                            <span class="account-title">种子URI </span>
                            <span id="seedNode" class="account-uri"></span>
                            <span class="account-title" style=" margin-left: 3%;">ID </span>
                            <span id="seedNodeID" class="account-uri"></span>
                        </div>

                        <br>

                        <button class="layui-btn layui-btn-danger"
                                style="margin-top: 2%" onclick="logout()">
                            <i class="fa fa-power-off"></i> 注销
                        </button>

                    </div>
                </div>
            </div>
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-header">操作</div>
                    <div class="layui-card-body">
                        <p>
                            <button class="layui-btn"
                                    onclick="getOtherBalance()">
                                <i class="layui-icon layui-icon-search"></i>

                                查询
                            </button>
                            <button class="layui-btn layui-btn-normal"
                                    onclick="transfer()">
                                <i class="layui-icon layui-icon-dollar"></i>

                                上传
                            </button>
                            <button class="layui-btn layui-btn-warm"
                                    onclick="mineBlock()">
                                <i class="layui-icon layui-icon-diamond"></i>

                                挖矿
                            </button>
                            <button class="layui-btn layui-btn-primary"
                                    onclick="check()">
                                <i class="layui-icon layui-icon-engine"></i>

                                检索完整区块链
                            </button>

                        </p>
                        <div style="color: #9d9d9d;margin: 3% 0 0 0;">
                            <span>© version 0.2</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
<script src="../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="../js/index.js"></script>
<script src="../js/common.js"></script>
</body>
</html>